package me.thinkjet.controller;

import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import com.jfinal.ext.route.ControllerBind;
import com.jfinal.plugin.ehcache.CacheInterceptor;
import com.jfinal.plugin.ehcache.CacheName;
import me.thinkjet.auth.AuthManager;
import me.thinkjet.model.Firm;
import me.thinkjet.model.Link;
import me.thinkjet.model.News;

import java.util.List;

@ControllerBind(controllerKey = "/link")
public class LinkController extends Controller {
	public void index() {
		Link link = Link.dao.findById(getPara());
		link.set("count", link.getInt("count") + 1).update();
		redirect(link.getStr("url"));
	}
}
